<template>
  <div>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column label="序号" align="center" prop="id" />
      <el-table-column prop="time" label="问诊时间" align="center" />
      <el-table-column prop="name" label="姓名" align="center" />
      <el-table-column prop="age" label="年龄" align="center" />
      <el-table-column prop="money" label="支付问诊金额" align="center" />
      <el-table-column prop="state" label="病情" align="center" />
      <el-table-column prop="medic" label="问诊医师姓名" align="center" />
      <el-table-column prop="number" label="问诊医师等级"  align="center" ></el-table-column>
      <el-table-column prop="nosocomium" label="问诊医师隶属医院" align="center" />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
      <template #default="scope">
        <el-button link type="primary" icon="Edit" @click="dialogTableVisible1 = true">诊断报告</el-button>
      </template>

        <el-dialog v-model="dialogTableVisible1" title="诊断报告" width="800">
          <el-table :data="gridData1">
            <el-table-column property="date" label="Date" width="150" />
            <el-table-column property="name" label="Name" width="200" />
            <el-table-column property="address" label="Address" />
          </el-table>
        </el-dialog>

    </el-table-column>

    </el-table>


  </div>
</template>

<script lang="ts" setup>
import {reactive, ref} from "vue";

const dialogTableVisible1 = ref(false)


const gridData1 = [
  {
    date: '2016-05-02',
    name: '王小虎',
    address: '上海市普陀区金沙江路 1518 弄'
  },
  {
    date: '2016-05-04',
    name: '王小虎',
    address: '上海市普陀区金沙江路 1517 弄'
  },
  {
    date: '2016-05-01',
    name: '王小虎',
  }
]

const tableData = [
  {
    id: '1',
    time: '2020-12-12    12：00',
    name: '王振',
    age: '23',
    money: '8',
    state: '头痛',
    medic: '李博然',
    number: '普通医师',
    nosocomium: '北京301'

  },
  {
    id: '2',
    time: '2020-12-12    12：00',
    name: '王振',
    age: '23',
    money: '8',
    state: '头痛',
    medic: '李博然',
    number: '普通医师',
    nosocomium: '北京301'

  },
  {
    id: '3',
    time: '2020-12-12    12：00',
    name: '王振',
    age: '23',
    money: '8',
    state: '头痛',
    medic: '李博然',
    number: '普通医师',
    nosocomium: '北京301'

  },
]

</script>

